package com.txd.mofa.adapter;

import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.txd.mofa.R;

import java.util.Map;

import de.hdodenhof.circleimageview.CircleImageView;

public class FabuLishiAdapter extends BaseQuickAdapter<Map<String, String>, BaseViewHolder> {

    public FabuLishiAdapter(int layoutResId) {
        super(layoutResId);
    }


    @Override
    protected void convert(BaseViewHolder helper, Map<String, String> item) {

        LinearLayout ll = helper.getView(R.id.ll);

        CircleImageView iv=  helper.getView(R.id.iv);

        Glide.with(mContext).load(item.get("img")).into(iv);

        if (item.get("choose").equals("1")){
            ll.setVisibility(View.VISIBLE);
        }else {
            ll.setVisibility(View.GONE);
        }

    }
}
